*** Settings ***
Library           Selenium2Library
Library           OperatingSystem
Library           AutoItLibrary
Resource          resource.txt

*** Test Cases ***
case-1
    [Setup]    打开网页
    Click Button    pay
    ${mes}    Handle Alert
    Sleep    2s
    click button    paycon
    Handle Alert    DISMISS
    Sleep    2s
    ${confirm}    Get Element Attribute    r    innerText
    Click Button    paycon
    Sleep    2s
    ${mes}    Handle Alert    ACCEPT
    Sleep    2s
    ${confirm}    Get Element Attribute    r    innerText
    [Teardown]    关闭网页

处理对话框AutoIt
    [Setup]    打开网页
    判断平台
    Click Button    pay
    ${mes}    关闭对话框    来自网页的消息
    Sleep    3s
    Click Button    paycon
    ${mes}    关闭对话框    来自网页的消息
    Sleep    2s
    ${confirm}    Get Element Attribute    r    innerText
    [Teardown]    关闭网页
